﻿@model Orchard.Core.Setup.ViewModels.SetupViewModel
<!DOCTYPE html>
<html class="static orchard-setup">
<head>
    <meta charset="utf-8" />
    <title>项目设置</title>
    <link href="/Core/Setup/Content/site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
    <div id="branding">
        <h1>欢迎使用Orchard框架</h1>
    </div>
</div>
<h1>框架设置</h1>
    @using (Html.BeginFormAntiForgeryPost())
    {
        @Html.ValidationSummary()
        <fieldset class="site">
            <div>
                <label for="SiteName">项目名称:</label>
                @Html.TextBoxFor(svm => svm.SiteName, new { autofocus = "autofocus" })
            </div>
        </fieldset>
        if (!Model.DatabaseIsPreconfigured)
        {
            <fieldset class="data">
                <legend>项目数据库：</legend>
                @Html.ValidationMessage("DatabaseOptions", "Unable to setup data storage")
                <div>
                    @Html.RadioButtonFor(svm => svm.DatabaseProvider, Orchard.Core.Setup.Controllers.SetupDatabaseType.Builtin.ToString(), new { id = "builtin" })
                    <label for="builtin" class="forcheckbox">使用SQL Server Compact数据库<span style="color: red;">（推荐）</span></label>
                </div>
                <div>
                    @Html.RadioButtonFor(svm => svm.DatabaseProvider, Orchard.Core.Setup.Controllers.SetupDatabaseType.SqlServer.ToString(), new { id = "sqlserver" })
                    <label for="sqlserver" class="forcheckbox">使用SQL Server数据库</label>
                </div>
                <div>
                    @Html.RadioButtonFor(svm => svm.DatabaseProvider, Orchard.Core.Setup.Controllers.SetupDatabaseType.MySql.ToString(), new { id = "mysql" })
                    <label for="mysql" class="forcheckbox">使用MySql数据库</label>
                </div>
                <div data-controllerid="builtin" data-defaultstate="hidden">
                    <label for="DatabaseConnectionString">数据库链接：</label>
                    @Html.EditorFor(svm => svm.DatabaseConnectionString)
                    <br />
                    <span data-controllerid="sqlserver" class="hint databaseTypeHint">
                        示例链接：@T("Data Source=sqlServerName;Initial Catalog=dbName;Persist Security Info=True;User ID=userName;Password=password")
                    </span>

                    <span data-controllerid="mysql" class="hint databaseTypeHint">
                        @T("Data Source=serverName;Database=dbName;User Id=userName;Password=password")
                    </span>

                    <br /><br />
                    <label for="DatabaseTablePrefix">@T("库表前缀：")</label>
                    @Html.EditorFor(svm => svm.DatabaseTablePrefix)
                </div>

            </fieldset>
        }
        @*<fieldset>
                <legend>@T("Choose an Orchard Recipe")</legend>
                <div>@T("Orchard Recipes allow you to setup your site with additional pre-configured options, features and settings out of the box")</div>
                <div>
                    <select id="@Html.FieldIdFor(m => m.Recipe)" name="@Html.FieldNameFor(m => m.Recipe)" class="recipe">
                    @foreach(var recipe in Model.Recipes) {
                        @Html.SelectOption(Model.Recipe, recipe.Name, recipe.Name, new { recipedescription = recipe.Description })
                    }
                    </select>
                </div>
                <div id="recipedescription">@Model.RecipeDescription</div>
            </fieldset>*@
        <div id="throbber">
            <div class="curtain"></div>
            <div class="curtain-content">
                <div>
                    <h1 id="setUpHeader">@T("安装进行中...")</h1>
                    <p>
                        <img src="@Href("../../content/synchronizing.gif")" alt="" />
                    </p>
                </div>
            </div>
        </div>

        <fieldset>
            <button class="primaryAction setupButton" type="submit">@T("马上安装")</button>
        </fieldset>
    }

    <script src="/Core/Setup/Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src=/Core/Setup/Scripts/base.js" type="text/javascript"></script>
    <script src="/Core/Setup/Scripts/setup.js" type="text/javascript"></script>

</body>
</html>